# import logging
# import yagmail
# def log_set():
#     logging.basicConfig(level=logging.DEBUG,filename="log.txt",format="%(message)s -> %(asctime)s")
#
# def send_mail(filepath):
#     mail = yagmail.SMTP(user='1689306711@qq.com', password="jmcxdzrdtuggfddb", host="smtp.qq.com")
#     mail.send(to='1689306711@qq.com', subject="测试报告", contents='测试报告，请查看', attachments=filepath)

import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.INFO,filename="log.txt",format="%(message)s -> %(asctime)s")
def send_mail(file):
    mail=yagmail.SMTP(user="1689306711@qq.com",password="jmcxdzrdtuggfddb",host="smtp.qq.com")
    mail.send(to="1689306711@qq.com",subject="王嘉兴是个大傻逼，很傻的傻逼",contents="测试报告，请查看",attachments=file)
